import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
      path: "/",
      name: 'index',
      redirect: "recomend"
    },
    {
      path: '/recomend',
      name: 'recomend',
      component: resolve => require(['@/components/recomend/recomend.vue'], resolve)
    },
    {
      path: '/rank',
      name: 'rank',
      component: resolve => require(['@/components/rank/rank.vue'], resolve)
    },
    {
      path: '/search',
      name: 'search',
      component: resolve => require(['@/components/search/search.vue'], resolve)
    },
    {
      path: '/singer',
      name: 'singer',
      component: resolve => require(['@/components/singer/singer.vue'], resolve),
      children:[{
        path: ":singer",
        name:"singerDetail",
        component: resolve => require(['@/components/singer-detail/singerDetail.vue'], resolve),
      }]
    }
  ]
})
